@using BootBlazor.Servers.Auth
@using BootBlazor.Servers.Chat
@using BootBlazor.Servers.Helper
@using BootBlazor.Servers.Data
@using BootBlazor.Servers.Services
@implements IAsyncDisposable
@rendermode InteractiveServer

<MudTooltip Text="@_loc["ChatToolTipText"]" Color="Color.Primary">
    @if (_noReadCount > 0 && !_isDialogOpen)
    {
        <MudBadge Content="@_noReadCount" Color="Color.Error" Overlap="true"
                  Origin="Origin.TopRight" BadgeClass="chat-message-badge">
            <MudIconButton Icon="@Icons.Material.Filled.Chat" Style="margin-right:12px;"
                           Color="Color.Inherit" Edge="Edge.Start" OnClick="ViewIm">
            </MudIconButton>
        </MudBadge>
    }
    else
    {
        <MudIconButton Icon="@Icons.Material.Filled.Chat" Style="margin-right:12px;"
                       Color="Color.Inherit" Edge="Edge.Start" OnClick="ViewIm" />
    }
</MudTooltip>
